package com.example.schedulist;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteDatabase.CursorFactory;
import android.database.sqlite.SQLiteOpenHelper;

public class PersonDBHelper extends SQLiteOpenHelper{
	private static final String DBASE_STRING = "mytable.sb";
	private static final int DBASE_VERSION = 1;
	
	private String createTable ="CREATE TABLE person VALUES (_id PRIMARY KEY INTEGER AUTOINCREDEMENT," +
			"name VARCHAR(20),tel VARCHAR(30),to_name VARCHAR(40),sign_time VARCHAR(30))";
	
	public PersonDBHelper(Context context) {
		super(context, DBASE_STRING, null, DBASE_VERSION);
		// TODO Auto-generated constructor stub
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		// TODO Auto-generated method stub
		db.execSQL(createTable);
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		// TODO Auto-generated method stub
		db.execSQL("ALERT TABLE person ADD COLUMN other STRING");
	}
	

}
